#jk409@qq.com
#FROM daocloud.io/ubuntu:trusty
FROM ubuntu:16.04
RUN apt update
#RUN apt install -y python-setuptools
RUN apt install python-imaging libjpeg-dev libfreetype6-dev zlib1g-dev libpng12-dev
RUN apt install -y  supervisor
RUN apt install -y python-pip
RUN pip install --upgrade setuptools
RUN pip install flask
RUN pip install requests
RUN pip install pyexcel-xls
RUN pip install xlwt
RUN apt  install -y gunicorn
RUN apt-get clean \
    && apt-get autoclean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY gunicorn.conf  /etc/
ADD ./flask  /var/flask
WORKDIR /var/flask
EXPOSE 9000
CMD  /usr/bin/gunicorn --config /etc/gunicorn.conf run:app
#--------------------------------------------
#ENTRYPOINT ["/usr/bin/gunicorn"]
#CMD ["--config","/etc/gunicorn.conf","run:app"]
#OR
##CMD ["/usr/bin/gunicorn","--config","/etc/gunicorn.conf","run:app"]
#OR
#CMD  /usr/bin/gunicorn --config /etc/gunicorn.conf run:app
#进入当前目录，构建test新镜像
#docker build -t 'test' .
#运行容器
#docker run -d -p 9001:9000 --name 'testing' test:latest

